#! /usr/bin/python

__author__ = "esoso"
__date__ = "$Jun 25, 2009 2:39:18 PM$"

from Card import Creature
from Card import Land
from Deck import Deck
from Player import Player
import logging
#from Game import Game


if __name__ == "__main__":
    logging.basicConfig(level=logging.DEBUG)
    cards = []
    swamps = []
    islands = []
    mountains = []
    vampires = []

    for i in xrange(5):
        swamps.append(Land('Swamp', 'B', '7E', 'Land', []))
        mountains.append(Land('Mountain', 'R', '7E', 'Land', []))
        islands.append(Land('Island', 'C', '7E', 'Land', []))
        
    for v in xrange(4):
        vampires.append(Creature('Sengir Vampire', 'B', '7E', 'Creature', [], {'U':3, 'B': 2}, 3, 3))

    cards.extend(swamps)
    cards.extend(islands)
    cards.extend(mountains)
    cards.extend(vampires)
    deck = Deck('Blu Nero', cards)
    player = Player('EsOsO')
    player.addDeck(deck)
    player.selectDeck('Blu Nero')
    player.untap()
    player.draw(7)

    hvampires = [v for v in player.hand if v in vampires]
    lands = [l for l in player.hand if l not in vampires]
    
    for land in lands:
        player.play(land)
        player.tap(land)
        print type(land)

    for vampire in hvampires:
        player.play(vampire)

    print player.in_play

